Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): event card #38

Merged
merged 1 commit into from
Aug 26, 2024
Merged

feat(ui): event card #38

merged 1 commit into from
Aug 26, 2024

Conversation

Mairon1206
Copy link
Collaborator

add EventCard and EventCardGroup

@Mairon1206 Mairon1206 requested a review from Serein207 August 25, 2024 11:42
@Mairon1206 Mairon1206 changed the title Feat/UI/event card feat(ui): event card Aug 25, 2024
@Mairon1206 Mairon1206 closed this Aug 26, 2024
@Mairon1206 Mairon1206 reopened this Aug 26, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@Mairon1206 Mairon1206 merged commit 94305c4 into dev Aug 26, 2024
5 checks passed
@Mairon1206 Mairon1206 deleted the feat/ui/event-card branch August 26, 2024 15:54
@Mairon1206
Copy link
Collaborator Author

Mairon1206 commented Aug 26, 2024

ui/components中添加以下内容:
Card: 拥有基本主题和动画效果的基础组件,便于以后扩展
EventCard:用于展示科协活动基本信息的卡片,属性event接受一个EventStruct类型数据,卡片高度固定
EventCardGroup:EventCard的网格布局,属性model接受一个EventStruct数组,回调参数类型为EventStruct,即点击的卡片对应的数据
EventStructEventState:与Infrastructure/network/Response中的类型相对应

src/Controller中添加Convert.hh用于实现network数据类型与slint数据类型的转化

aurora0x27 pushed a commit that referenced this pull request Aug 29, 2024
feat(ui): `Card`, `EventCard` , `EventCardGroup` and coversion function in `Convert.hh`
zwow-cj pushed a commit that referenced this pull request Aug 30, 2024
feat(ui): `Card`, `EventCard` , `EventCardGroup` and coversion function in `Convert.hh`
Comment on lines +31 to +35
auto startTimer = std::chrono::system_clock::to_time_t(startTp);
auto startDate = *std::gmtime(&startTimer);

auto endTimer = std::chrono::system_clock::to_time_t(endTp);
auto endDate = *std::gmtime(&endTimer);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要考虑时区问题,服务器传过来的是 UTC 时间,需要根据系统时区设置转换为本地时间

Serein207 added a commit that referenced this pull request Sep 19, 2024
* feat(ui): complete main layout, add carousel.

* feat(ui): add layout to "current activity"

* feat(executor): different modes of `asyncExecute` using a timer

One more parameter of `asyncExecute` when using a timer: TimerFlag flag
TimerFlag::Once: perform the operation only once
TimerFlag::Periodic: perform the operation periodically
Implementation of `asyncExecuteByTimer` optimized
`io_context` exposed for more flexibility

* feat(executor): add execution strategy

* feat: add view data to `ViewManager` (#17)

* fix: added assert to `UiBridge::call`

* refactor: added included header in `BasicView` for convenience

* feat: added view data to `ViewManager`

* feat(net): github api  (#28)

* feat:completed github api  interface

* style:Change code style to match clang-format

---------

Co-authored-by: Serein <118594118+Serein207@users.noreply.github.com>

* docs(executor): optimize flag description

* feat(net): evento api (#26)

* feat:Preliminarily completed the implementation of the evento api interface

* fix(net): Use `std::string` for all non-string arguments to meet the interface requirements of the URL library to resolve the compilation error.

* fix(net)!: fix the false return type of refreshAccessToken and change the return type from void to bool for some function

* fix(net): Fixed incorrect behavior in refreshAccessToken function.

* refactor(net): Modified the return value settings of some functions to make the overall behavior more in line with server interface expectations

* feat(net)!: Modified some function interfaces and implementations to align with the new backend interface specifications

* feat(net): Implemented department-related functions.

* fix(net): fix JSON parsing problem

* feat(net)!: Changed the return value types of some functions to avoid passing arguments by reference.

Additionally, renamed some incorrectly named variables in EventEntity to conform to backend interface specifications.

* style(net): Modified code style to meet requirements.

* feat(net): Add getEventList function

* feat(net)!: Deprecated some functions and change the name of some variables and functions.

* feat(net)!: Primarily enhanced the security of certain functions.

Additionally changed the definition locations of some variables and optimized the parameter names of some functions.

* feat(net): Initialize `std::optional<FeedbackEntity>` as `std::nullopt` in getUserFeedback

* feat(ui): add scrollview to layout

* feat/ui/discovery-page: add scarousel to scroollview

* feat/ui/DiscoveryPage: accomplish dynamic grid
using double for loop in VerticalLayout, but font not set yet

* feat(ui): ui core multiple update (#31)

* feat(ui): added state layer
* feat(ui): modify overlay, improve menu and login
* feat(ui): improve `MessageManager`
* feat(ui): added developer shortcut to skip `LoginOverlay`

Press Ctrl + Shift + Right click on shadow of `LoginOverlay` to skip login

* feat: set default slint style to material

* fix(ui): fix toast and login shadow (#33)

* fix(ui): make login shadow opaque
* fix(ui): make toast higher than overlay

* feat: slint experimental feature

* feat(ui): initialize sur-ui default theme

* fix: crash showing message when another message on screen

* feat(ui): optimize menu overlay

* fix: open url failed on macos

* build(deps): bump 3rdpart/sast-link-cxx-sdk from `9e2e743` to `2f62634` (#34)

Bumps [3rdpart/sast-link-cxx-sdk](https://github.com/Serein207/sast-link-cxx-sdk) from `9e2e743` to `2f62634`.
- [Release notes](https://github.com/Serein207/sast-link-cxx-sdk/releases)
- [Commits](Serein207/sast-link-cxx-sdk@9e2e743...2f62634)

---
updated-dependencies:
- dependency-name: 3rdpart/sast-link-cxx-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: make `openBrowser` inline, added dev shortcut

Ctrl+Shift+Left click for skip login
Ctrl+Shift+Right click for fake login (not trigger onLogin)

* fix: menu expand animation lost

* chore(cmake): remove useless variable

* build(deps): bump 3rdpart/sast-link-cxx-sdk from `9e2e743` to `2f62634` (#35)

Bumps [3rdpart/sast-link-cxx-sdk](https://github.com/Serein207/sast-link-cxx-sdk) from `9e2e743` to `2f62634`.
- [Release notes](https://github.com/Serein207/sast-link-cxx-sdk/releases)
- [Commits](Serein207/sast-link-cxx-sdk@9e2e743...2f62634)

---
updated-dependencies:
- dependency-name: 3rdpart/sast-link-cxx-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Serein <118594118+Serein207@users.noreply.github.com>

* feat(ui): finish setting page (#21)

* feat:some basic laying

* feat(ui): basic laying on the page

* ui laying primary draft

* feat(ui): callbacks and root

* attempt to fill in .cc and .slint

* callbacks fiied

* feat: setting page

* feat: change theme when app start

* chore: clean up code

* feat(ui): add scroll view in setting page

---------

Co-authored-by: Serein <2075337935@qq.com>

* feat(ui): `LoadingButton` component (#37)

* feat: basic `LoadingButton`
* feat: add custom animate
* feat: export component in index, clean up code

* refactor!: drop icon color auto switch function (#42)

* refactor!: drop icon color auto switch
* fix: correct existing `Image`

reasons:
- reduce resource file number and executable size when embed resource
- color not exactly match environment (not the same color of text)
- auto switch require duplicate files with little difference, and not fit into some special requirements perfectly
- colorize support animation

How to migrate:

```
Image {
    source: Token.image.icon.me;
    colorize: Token.color.on-surface; // should be added to all Image with source Token.image.icon.*
}
```

Following icon keep previous behavior.

- evento (bad support for `colorize`)

BREAKING CHANGE: remove support for icon color auto-switch, please use `colorize` property of `Image` instead.

* feat(ui): event card (#38)

feat(ui): `Card`, `EventCard` , `EventCardGroup` and coversion function in `Convert.hh`

* feat(ui): improve view data logic

use std::array instead for convenience

* feat(assets): remove useless images

* feat(card): optimize animation

* feat(card): optimize event card

* feat(font): increase font size

* feat(ui)!: add md3 button (#46)

* feat(ui): added scrim, shadow color and elevation
* feat(ui): improve menu shadow
* feat(ui): improve state layer
* feat(ui): improve `LoadingAnimation`
* feat(ui): added md3 button

BREAKING CHANGE: 目前 LoadingButton 已被删除,请使用 LoadingAnimation 和 Button 的组合

* feat(ui): complete main layout, add carousel.

* feat(ui): add scrollview to layout

* feat/ui/DiscoveryPage: accomplish dynamic grid
using double for loop in VerticalLayout, but font not set yet

* feat/ui/discovery-page: use component eventcardgroup

* feat/ui/discovery-page: pull before push to remote

* feat(ui): fix compile error and conflicts

* feat/ui/discovery-page: modify component height

* feat/ui/discovery-page: finish page display

* feat/ui/discovery-page: seperate current and newest event

* feat/ui/discovery-page: delete dead code

* fix: correct about page link color

* refactor: new login overlay

* docs(readme): change to english

* feat(cache): clear disk cache

* fix(net)!: potential lifetime problem & modify api

* perf(net): change buffer to local variable

* fix(ui): load image logic

* feat(ui): clean up code

* fix

* ci: limit thread number of build

* build: replace platform macro

* fix: remove redundant code due to merge

* feat: controller logic

* fix: miss header

* perf: condition render info text

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Mairon <3043462073@qq.com>
Co-authored-by: Serein <2075337935@qq.com>
Co-authored-by: cEvolve05 <cEvolve05@gmail.com>
Co-authored-by: shuzhuxvchuang <149923641+afkdsghk211331@users.noreply.github.com>
Co-authored-by: Serein <118594118+Serein207@users.noreply.github.com>
Co-authored-by: ZhiweiCOfficial <48409459+schoolbag123@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DTPA101 <154043471+DTPA101@users.noreply.github.com>
Co-authored-by: Mairon <153294662+Mairon1206@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants